
export default function (Vue) {
  Vue.mixin({
    methods: {
      goBack () {
        this.$router.go(-1)
      },
      clearParams (params) {
        if (typeof params === 'object') {
          for (let item in params) {
            params[item] = undefined
          }
        } else {
          this.$message.info('请输入正确的参数')
        }
      },
      fillParams (form, row) {
        if (typeof form === 'object' && typeof row === 'object') {
          for (let i in form) {
            for (let j in row) {
              if (i === j) {
                form[i] = row[j]
              }
            }
          }
        } else {
          this.$message.info('请输入正确的参数')
        }
      },
      changeDate1 (val) {
        val ? this.form.beginDate = Date.parse(val) : this.form.beginDate = undefined
      },
      changeDate2 (val) {
        val ? this.form.endDate = Date.parse(val) : this.form.endDate = undefined
      }
    }
  })
}
// import router from '../router'
// let myMinix = {
//   methods: {
//     goBack () {
//       router.go(-1)
//     }
//   }
// }
// export default myMinix
